<?php


namespace app\backend\controller;


use app\backend\service\CountBoxService;

class CountBox extends Backend
{

    /**
     * 宝箱统计
     * @param CountBoxService $service
     * @return string|\think\response\Json
     */
    public function index(CountBoxService $service)
    {
        if ($this->request->isAjax()) {
            $data = $service->lists($this->request->param());
            return $this->success($data);
        }
        return $this->fetch();
    }
}